package com.wzy.pojo;

import com.wzy.annotation.Extract;
import com.wzy.annotation.JsoupDocument;

/**
 * 描述  :
 * 创建人:    Wzy
 * 创建时间: 2020-06-05  16:11
 */
@JsoupDocument(domain = "https://zhipeng0908.gitee.io/", targetUrl = "https://zhipeng0908.gitee.io/",
        cssQuery = ".post-block")
public class Article {

    @Extract(cssQuery = ".post-category", prefix = "| 分类于")
    private String category;

    @Extract(cssQuery = ".post-block .post-title-link")
    private String title;

    @Extract(cssQuery = ".post-block .post-title-link", attr = "href")
    private String url;
    @Extract(cssQuery = ".post-body > p")
    private String comment;

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    @Override
    public String toString() {
        return "Article{" +
                "category='" + category + '\'' +
                ", title='" + title + '\'' +
                ", url='" + url + '\'' +
                ", comment='" + comment + '\'' +
                '}';
    }
}
